<?php
namespace Tbf\Bundle\YntAuthBundle\Model;
use Tbf\Bundle\YntAuthBundle\Service\MediaManager;

class Media {
    /** @var  string */
    protected $name_ch;
    /** @var  string */
    protected $name_en;
    /** @var string */
    protected $name_short_ch;
    /** @var  MediaManager */
    protected $media_manager;
    function __construct($name_en,$name_ch,$name_short_ch=null){
        $this->name_en = $name_en;
        $this->name_ch = $name_ch;
        if ($name_short_ch===null){
            $this->name_short_ch = $name_ch;
        }else{
            $this->name_short_ch = $name_short_ch;
        }
    }

    /**
     * @param string $name_ch
     */
    public function setNameCh($name_ch)
    {
        $this->name_ch = $name_ch;
    }

    /**
     * @return string
     */
    public function getNameCh()
    {
        return $this->name_ch;
    }

    /**
     * @param string $name_en
     */
    public function setNameEn($name_en)
    {
        $this->name_en = $name_en;
    }

    /**
     * @return string
     */
    public function getNameEn()
    {
        return $this->name_en;
    }

    /**
     * @param string $name_short_ch
     */
    public function setNameShortCh($name_short_ch)
    {
        $this->name_short_ch = $name_short_ch;
    }

    /**
     * @return string
     */
    public function getNameShortCh()
    {
        return $this->name_short_ch;
    }

    /**
     * @param \Tbf\Bundle\YntAuthBundle\Service\MediaManager $media_manager
     */
    public function setMediaManager($media_manager)
    {
        $this->media_manager = $media_manager;
    }

    /**
     * @return \Tbf\Bundle\YntAuthBundle\Service\MediaManager
     */
    public function getMediaManager()
    {
        return $this->media_manager;
    }

    /**
     * @return \Tbf\Bundle\YntAuthBundle\MediaImpInterface
     */
    public function getMediaImp(){
        return $this->media_manager->getMediaImpByMediaNameEn($this->name_en);
    }
}